<?php
  $song = str_replace(".mp3", "", "$_GET[song]");
  $song = str_replace('_', ' ', $song);
  include('./init.php');
  $res = mysql_query("SELECT id_file,file_name FROM bj_audio WHERE file_title='". mysql_real_escape_string($_GET['song']) . "'");
  if ($res !== FALSE && mysql_num_rows($res)) {
    $lin = mysql_fetch_row($res);
    mysql_query("UPDATE traffic_stats SET item_views=item_views+1 WHERE item_id='{$lin[0]}'") or die(mysql_error());
  } else {
    header('Location: ./notfound.html');
    exit;
  }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song </title>
<meta name="description" content="TV Theme music and songs from 18,952 different television shows. Listen to them all in MP3 format." />
<meta name="keywords" content="<?php echo str_replace('.mp3', '', $lin[1]);?> theme song, <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> theme music, <?php echo str_replace('.mp3', '', $lin[1]); ?>s music, TV Theme songs, television songs, tv tunes"/>
<meta property="og:title" content=""/>
<meta property="og:site_name" content="TelevisionTunes.com"/>
<meta property="og:image" content="http://www.televisiontunes.com/images/logo-tiny2.jpg"/>
<link rel="stylesheet" href="css/css.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/email.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS latest songs" href="http://www.televisiontunes.com/rss.php" />
<script language="JavaScript" type="text/javascript" src="js/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="js/functions.js"></script>

<style type="text/css">
<!--
.style4 {font-size: 12px}
.style5 {
	font-size: 1.3em;
	font-weight: bold;
}
a img { border:0px;}
a.download { color:white; }
a:hover.download { color:black; }
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
  <link type="text/css" href="/skin/jplayer.blue.monday.css" rel="stylesheet" />
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
  <script type="text/javascript" src="/js/jquery.jplayer.min.js"></script>
</head>

<body>
<?php include('blocks/google-analytics.php'); ?>
<div id="wrap">
	<div id="header">
		<?php include('blocks/header.php'); ?>
 		<ul>
			<li><a href="index.php" class="active">Home</a></li>
			<!--<li><a href="browse.php">Index</a></li>-->
			<li><a href="game.php">Game</a></li>
			<li><a href="links.php">Links</a></li>
			<li><a href="search.php">Search</a></li>
			<li><a href="missing-songs.php">Wanted</a></li>
			<li><a href="copyright.php">Legal</a></li>
			<li><a href="contact.php">Contact</a></li>
		</ul>
	</div>

	<div id="content-wrap">
				<div style=""><a href="http://www.televisiontunes.com/donate.php"><img src="images/tvtunes-header-donations-bar.jpg" width="899px" border="0"></a></div>
		<div id="main">
			<table border="0" width="100%" align="center">
				<tr><td height="5"></td></tr>
				<tr>
					<td>
						<a href="<?php echo ABS_URL ?>index.php"><img src="images/TVGuy-small.png" alt="Television Tunes" border="0" /></a>
					</td>
					<td>
						<?php include('blocks/index.php'); ?>
					</td>
				</tr>
			</table>

			<table border="0" width="100%" align="center">
				<tr>
					<td width="52%" align="center" valign="top">
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td style="color:#333333; font-size:17px; font-weight:600; padding-right:15px;">
									<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song
								</td>
							</tr>
							<tr><td height="20px"></td></tr>								
							<tr>
								<td class="fb_like" align="center">									
									<div id="fb-root"></div>
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    <script>
      FB.init({appId: '178261387583', status: true,
               cookie: true, xfbml: true});
      FB.Event.subscribe('auth.login', function(response) {
        window.location.reload();
      });
    </script>
									<fb:like width="325" height="20" show_faces="false" colorscheme="default" font="Arial"></fb:like>
								</td>
							</tr>	
							<tr>
								<td height="20px">
									<div align="center">
                  	<!--<a href="#" class="get_song">Get this song as a Ringtone</a>-->
                    <?php
										if ($_GET['song'] == 'Andy_Griffith_Show' ||
										$_GET['song'] == 'Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'The_Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'Gomer_Pyle_USMC' ||
										$_GET['song'] == 'I_Spy' ||
										$_GET['song'] == 'Mod_Squad'
										) {
										?>
									</div>
								  <div style="text-align: left; font-size: .85em;"> &nbsp;&nbsp;&nbsp;To get this ringtone, text 'clstv' (as in Classic TV!) to 32852 to get these classic tv ringtones on any T Mobile, AT&amp;T/Cingular, Verizon or Sprint wireless device. <br />
  									&nbsp;&nbsp;&nbsp;When you send the text, you'll get a text back taking you to a download page where you can select which ringtone to download. <br />
  									&nbsp;&nbsp;&nbsp;Or log into your carrier's website, go to the Ringtones page, and search for &quot;<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>&quot; 
  								</div>
                  <div align="center">
                  	<?php } else { ?>
                    <img src="images/phone.png" alt="" width="16" height="17" />&nbsp;&nbsp;<a href="http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=TETUros&amp;artist=theme&amp;song=<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>" class="" onclick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" target="_blank"><span class="style4">Send <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?><br /> to your Cell as a Ringtone</span></a> 
                    
                 <span class="style4">&nbsp;&nbsp;<img src="images/phone.png" alt="" width="16" height="17" />
                    <?php } ?>
									</div>
								</td>
						  </tr> 	
							<tr>
								<td align="center"><script type="text/javascript">
									AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','269','height','56','id','Mp3','align','middle','src','Mp3?file=themesongs/<?php echo $lin[1]; ?>','quality','high','wmode','transparent','bgcolor','#ffffff','name','Mp3','allowscriptaccess','sameDomain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','Mp3?file=themesongs/<?php echo $lin[1]; ?>' ); //end AC code
									</script>
									<noscript>
									<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="269" height="56" id="Mp3" align="middle">
								  <param name="allowScriptAccess" value="sameDomain" />
								  <param name="movie" value="Mp3.swf?file=themesongs/<?php echo $lin[1]; ?>" />
								  <param name="quality" value="high" />
								  <param name="wmode" value="transparent" />
								  <param name="bgcolor" value="#ffffff" />
								  <embed src="Mp3.swf?file=themesongs/<?php echo $lin[1]; ?>" quality="high" wmode="transparent" bgcolor="#ffffff" width="269" height="56" name="Mp3" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />          
								  </object>
								  </noscript>
								  <script type="text/javascript" src="ieupdate.js"></script>
							  </td>
							</tr>
							<tr><td height="5px"></td></tr>
					  						
							<tr>
								<td align="center">
									<table cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td align="right" width="33%">
												<a class="download" href="download.php?f=<?php echo urlencode($_GET['song']); ?>" onClick="javascript: pageTracker._trackPageview('/download/<?php echo $song; ?>');"><img src="images/back.png" alt="back" border="0" /> 
												<br />
												Download</a>															
											</td>
											<td align="center" width="33%" valign="top" style="padding-top:15px;">
 
												<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=c9cf4f7f-936d-4bff-8063-3c01d20669ef&amp;type=website&amp;post_services=email%2Cfacebook%2Ctwitter%2Cgbuzz%2Cmyspace%2Cdigg%2Csms%2Cwindows_live%2Cdelicious%2Cstumbleupon%2Creddit%2Cgoogle_bmarks%2Clinkedin%2Cbebo%2Cybuzz%2Cblogger%2Cyahoo_bmarks%2Cmixx%2Ctechnorati%2Cfriendfeed%2Cpropeller%2Cwordpress%2Cnewsvine&amp;button=false"></script>
												<a id="ck_email" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/email.gif" /></a>
												<a id="ck_facebook" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/facebook.gif" /></a>
												<a id="ck_twitter" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/twitter.gif" /></a>
												<a id="ck_sharethis" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/sharethis.gif" />ShareThis</a>																								
												<script type="text/javascript">
													var shared_object = SHARETHIS.addEntry({
													title: document.title,
													url: document.location.href
												});												
												shared_object.attachButton(document.getElementById("ck_sharethis"));
												shared_object.attachChicklet("email", document.getElementById("ck_email"));
												shared_object.attachChicklet("facebook", document.getElementById("ck_facebook"));
												shared_object.attachChicklet("twitter", document.getElementById("ck_twitter"));
												</script>		
														
											</td>
											<td align="left" width="33%">
												<a class="download" href="javascript: history.go(-1)"><img src="images/download.png" alt="Download <?php echo $song; ?> theme song" border="0" />
												<br />
												Back</a>															
											</td>
										</tr> 
										<tr>
											<td colspan="5" valign="top" style="padding-top:5px;" align="center">
										
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr><td height="10px"></td></tr>								
							<tr>
						    <td height="5">
									<div align="center">
                  	<!--<a href="#" class="get_song">Get this song as a Ringtone</a>-->
                    <?php
										if ($_GET['song'] == 'Andy_Griffith_Show' ||
										$_GET['song'] == 'Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'The_Dick_Van_Dyke_Show' ||
										$_GET['song'] == 'Gomer_Pyle_USMC' ||
										$_GET['song'] == 'I_Spy' ||
										$_GET['song'] == 'Mod_Squad'
										) {
										?>
									</div>
								  <div style="text-align: left; font-size: .85em;"> &nbsp;&nbsp;&nbsp;To get this ringtone, text 'clstv' (as in Classic TV!) to 32852 to get these classic tv ringtones on any T Mobile, AT&amp;T/Cingular, Verizon or Sprint wireless device. <br />
  									&nbsp;&nbsp;&nbsp;When you send the text, you'll get a text back taking you to a download page where you can select which ringtone to download. <br />
  									&nbsp;&nbsp;&nbsp;Or log into your carrier's website, go to the Ringtones page, and search for &quot;<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>&quot; 
  								</div>
                  <div align="center">
                  	<?php } else { ?>
                    <img src="images/phone.png" alt="" width="16" height="17" />&nbsp;&nbsp;<a href="http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=TETUros&amp;search=<?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?>" class="" onclick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" target="_blank"><span class="style4">Send <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?><br /> to your Cell as a Ringtone</span></a> <span class="style4">&nbsp;&nbsp;<img src="images/phone.png" alt="" width="16" height="17" />
                    <?php } ?>
									</div>
								</td>
						  </tr>
							<tr>
								<td align="center">
								  <br />
								  <table cellpadding="0" cellspacing="0" border="0"><tr><td style="color:#333333; padding-right:20px;" valign="top">
								  If you enjoy the site, please feel free to show your appreciation by making a donation. Any amount helps
								</td>
								<td valign="top">
								  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
									<input type="hidden" name="cmd" value="_s-xclick">
									<input type="hidden" name="hosted_button_id" value="2031475">
									<input type="image" src="images/paypal_donate.jpg" border="0" name="submit" alt="">
									<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
									</form>
								</td>
							</tr>
						</table>
								</td>
						  </tr>
							<tr>
								<td height="20">
									<div align="center">
								  	<table width="100%" border="0">
                    	<tr>
                    	</tr>
										</table>
 									</div>
 								</td>
 							</tr>
							<tr></tr>
				  	</table>
				  </td>
					<td width="48%" valign="top" style="padding-left:50px;">
						<div id="emailContainer" style="display: none;"></div>
						<p>
						<strong>Newest Songs </strong><br />
						<select name="lsongs" onchange="document.location.href=this.options[this.selectedIndex].value" style="width:300px;">
						<option>Select a Song</option>
						<?php
							$res = mysql_query("SELECT file_name, file_title FROM bj_audio ORDER BY date_added DESC LIMIT 100");
							if ($res !== FALSE && mysql_num_rows($res)) {
								while($lin = mysql_fetch_assoc($res)) {
									echo '<option value="' . utils::create_href($lin['file_title']) . '">' . htmlspecialchars(str_replace('.mp3', '', $lin['file_name'])) . '</option>';
								}
								mysql_free_result($res);
							}
						?>
						</select>
						</p>
						<br />
						<?php include('blocks/ads_mediumRectangle.php');?>
						<br /><br />
						<div align="">


							
					  </div>
					</td>
				</tr>
			</table>
			<center>
			<table width="600" style="border:1px solid #4d1516;" cellpadding="0" cellspacing="0">
				<tr>
			  	<td height="27" colspan="4" align="left" style="padding-left:15px; color:white; background:url(images/header-sites1.png) repeat-x;">Check out these sites for more great stuff...</td>
			  </tr>
				<tr>
					<td valign="top">
						<table border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td style="border-right:1px solid #4d1516;">
									<table border="0" cellpadding="0" cellspacing="0">
										<tr>
			  							<td height="62" style="padding:0px 10px; border-bottom:1px solid #4d1516;"><a href="http://gamethemesongs.com"><img src="images/gamethemesongs.jpg" alt="Video Game Songs" width="47" border="0" /></a></td>
			  							<td style="border-bottom:1px solid #4d1516;"><a href="http://gamethemesongs.com" style="color:#7d1e1f;" target="_blank">Game Theme Songs</a><br />
			    						<a href="http://gamethemesongs.com" style="color:#333;" target="_blank">For video game music and songs.</a></td>
			  						</tr>
										<tr>
			  							<td style="padding:5px 10px 5px 10px; border-bottom:1px solid #4d1516;"><a href="http://tvadsongs.com"><img src="tinys/tv-adsongs.jpg" alt="" width="47" border="0" /></a></td>
			  							<td style="border-bottom:1px solid #4d1516;"><a href="http://tvadsongs.com" style="color:#7d1e1f;">TV Ad Songs</a>.<br> <a href="http://tvadsongs.com" style="color:#333;">For TV commercials with great songs.</a></td>
			  						</tr>
						    		<tr>
			  							<td height="50" style="padding:5px 10px 5px 10px;"><a href="http://fcsongs.com"><img src="tinys/fc-songs.jpg" alt="Football Club Music" width="47" border="0" /></a></td>
			  							<td><a href="http://fcsongs.com" style="color:#7d1e1f;" >FC Songs</a>.<br> <a href="http://fcsongs.com" style="color:#333;">For football club songs from around the world.</a></td>
			  						</tr>
									</table>
								</td>

								<td>
									<table border="0" cellpadding="0" cellspacing="0">
										<tr>
				  						<td height="50" style="padding:0px 10px;border-bottom:1px solid #4d1516;"><a href="http://spookysoundtrack.com"><img src="tinys/spooky.jpg" width="47" alt="halloween music" border="0" longdesc="http://spookysoundtrack.com" /></a></td>
				  						<td style="border-bottom:1px solid #4d1516;"><p><a href="http://spookysoundtrack.com">Halloween Music</a></p>
			      					<p>Lots and lots of <a href="http://spookysoundtrack.com">scary songs and sound effects</a>.</p></td>
				  					</tr>
										<tr>
				  						<td height="60" style="padding:10px 10px 5px 10px;border-bottom:1px solid #4d1516;"><a href="http://footballfightmusic.com"><img src="tinys/footballfight.jpg" width="47" height="47" alt="football music" /></a></td>
				  						<td style="border-bottom:1px solid #4d1516;"><p><a href="http://footballfightmusic.com">Football Music</a></p>
			      					<p><a href="http://footballfightmusic.com">Football songs</a> from the NCAA and NFL.</p></td>
				  					</tr>
										<tr>
				  						<td height="57" style="padding:5px 10px 5px 10px;"><a href="http://holysmokesbatman.com"><img src="tinys/robin.jpg" width="47" height="47" alt="batman and robin" longdesc="http://holysmokesbatman.com" /></a></td>
				  						<td>Hilarious sound clips from <a href="http://holysmokesbatman.com">Batman</a> and <a href="http://imtroymcclure.com">Troy McClure</a></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			</center>
	  </div><!-- content-wrap ends here -->
	</div>
	<!-- footer starts here -->
	<div id="footer">
		<?php include('blocks/footer.php'); ?>
	</div>
<!-- footer ends here -->
<!-- wrap ends here -->
</div>
</body>
</html>